<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>邮箱列表 - Powered By LIUSANY</title>
</head>
<body class="list">
	<div class="bar">
		邮箱列表&nbsp;总记录数: ${pager.totalItems} (共${pager.totalPages}页)
	</div>
	<div class="body">
		<form:form id="listForm" modelAttribute="page" action="${ctx}/admin/email/list" method="post">
		<div class="listBar">
		<input type="button" class="formButton" onclick="location.href='${ctx}/admin/email/toupload'" value="导入邮箱" hidefocus />
		 &nbsp;&nbsp;
		        Email
		        <input type="text" name="filter_LIKES_email" value="${param['filter_LIKES_email']}"/>
		        &nbsp;&nbsp;
		        状态
		        <select name="filter_EQS_sendStatus" id="sendStatus">
		           <option value="" >
						全部
					</option>
					<option value="unsend" <c:if test="${param['filter_EQS_sendStatus']=='unsend'}">selected</c:if>>
						未发送
					</option>
					<option value="send" <c:if test="${param['filter_EQS_sendStatus']=='send'}">selected</c:if>>
						已发送
					</option>
					<option value="failed" <c:if test="${param['filter_EQS_sendStatus']=='failed'}">selected</c:if>>
						失败
					</option>
				</select>
				&nbsp;&nbsp;
				<input type="button" id="searchButton" class="formButton" value="搜 索" hidefocus />
				&nbsp;&nbsp;
				
				<label>每页显示: </label>
				<select name="pageSize" id="pageSize">
					<option value="10" <c:if test="${pager.pageSize == 10 }">selected</c:if> >
						10
					</option>
					<option value="20" <c:if test="${pager.pageSize == 20 }">selected</c:if> >
						20
					</option>
					<option value="50" <c:if test="${pager.pageSize == 50 }">selected</c:if> >
						50
					</option>
				</select>
		</div>
			<table id="listTable" class="listTable">
				<tr>
					<th class="check">
						<input type="checkbox" class="allCheck" />
					</th>
					<th>
						<a href="#"  hidefocus>ID编号</a>
					</th>
					<th>
						<a href="#"  hidefocus>Email</a>
					</th>
					<th>
						<a href="#"  hidefocus>状态</a>
					</th>
				</tr>
				
				<c:forEach items="${pager.result}" var="email">
					<tr>
						<td>
							<input type="checkbox" name="ids" value="${email.id}" />
						</td>
						<td>
							${email.id}
						</td>
						<td>
							${email.email}
						</td>
						<td>
							<c:if test="${email.sendStatus == 'unsend'}">未发送</c:if>
							<c:if test="${email.sendStatus == 'send'}">已发送</c:if>
						</td>
					</tr>
				</c:forEach>
				
			</table>
			<div class="pagerBar">
				<div class="pager">
				<%@ include file="/WEB-INF/views/admin/pager.jsp"%>
			    </div>
	    </form:form>
	</div>
</body>
</html>